#pragma once

#include <iostream>
#include <string>
#include <unistd.h>
#include <fcntl.h>


class Util
{
public:
    //设置成非阻塞状态
    static void SetNonBlock(int fd)
    {
        int fl = fcntl(fd, F_GETFL);
        fcntl(fd, F_SETFL, fl | O_NONBLOCK);
    }
};